package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Description: 库位定义
 * @Author: MxpIO
 * @Date:   2021-10-06
 * @Version: V1.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Table(name = "MB_ERP_EQUIPMENT_STOCK_LOCATION")
@Entity
@Schema(description="库位定义")
public class EquipmentStockLocation extends BaseEntity {
    private static final long serialVersionUID = 1L;

	/**主键*/
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;
	/**库位名称*/
    @Column(name = "LOCATION_NAME_")
    @Schema(description = "库位名称")
    private String locationName;
	/**库位编码*/
    @Column(name = "LOCATION_CODE_")
    @Schema(description = "库位编码")
    private String locationCode;
	/**厂区*/
    @Dict(dicCode = "ERP_EQUIPMENT_FACTORY")
    @Column(name = "FACTORY_")
    @Schema(description = "厂区")
    private String factory;
	/**库房*/
	@Dict(dicEntity =EquipmentStock.class, dicText = "stockName", dicCode = "id")
    @Column(name = "STOCK_ID_")
    @Schema(description = "库房")
    private String stockId;
	/**库位号*/
    @Column(name = "LOCATION_NUM_")
    @Schema(description = "库位号")
    private Integer locationNum;
	/**库位尺寸*/
    @Column(name = "LOCATION_SIZE_")
    @Schema(description = "库位尺寸")
    private String locationSize;
	/**备品*/
	@Dict(dicEntity =EquipmentMaterial.class, dicText = "name", dicCode = "id")
    @Column(name = "MATERIAL_ID_")
    @Schema(description = "备品")
    private String materialId;
	/**是否存在备品*/
	@Dict(dicCode = "MB_SYSTEM_YES_NO")
    @Column(name = "IS_MATERIAL_")
    @Schema(description = "是否存在备品")
    private Integer isMaterial;
	/**是否有效*/
	@Dict(dicCode = "MB_SYSTEM_YES_NO")
    @Column(name = "IS_ENABLE_")
    @Schema(description = "是否有效")
    private Integer isEnable;
	/**备注*/
    @Column(name = "REMARKS_")
    @Schema(description = "备注")
    private String remarks;
}
